cmake_minimum_required(VERSION 3.21)
project(DhopReplay)
 
set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall")
set(CMAKE_CXX_FLAGS "-Wno-error=deprecated-declarations -Wno-deprecated-declarations ")

# Cross compile configure
## zmq
set(ZMQ_INCLUDE_PATH ${PROJECT_SOURCE_DIR}/thirdlib/libzmq/include)
set(ZMQ_LIB_PATH ${PROJECT_SOURCE_DIR}/thirdlib/libzmq/${CMAKE_SYSTEM_PROCESSOR}/lib)
##protbuff
set(PROTOBUF_INCLUDE_PATH ${PROJECT_SOURCE_DIR}/thirdlib/libprotobuf/include)
set(PROTOBUF_LIB_PATH ${PROJECT_SOURCE_DIR}/thirdlib/libprotobuf/${CMAKE_SYSTEM_PROCESSOR}/lib)
##hv
set(HV_INCLUDE_PATH ${PROJECT_SOURCE_DIR}/thirdlib/libhv/include)
set(HV_LIB_PATH ${PROJECT_SOURCE_DIR}/thirdlib/libhv/${CMAKE_SYSTEM_PROCESSOR}/lib)

## zmqv
include_directories(${ZMQ_INCLUDE_PATH})
link_directories(${ZMQ_LIB_PATH})

## protobuf
include_directories(${PROTOBUF_INCLUDE_PATH})
link_directories(${PROTOBUF_LIB_PATH})

##hv
include_directories(${HV_INCLUDE_PATH})
link_directories(${HV_LIB_PATH})

add_executable(${PROJECT_NAME}  main.cpp
                                Logger.cpp
                                FileReader.cpp
                                ImageSender.cpp
                                DetectInfoReciver.cpp
                                TimeUtil.cpp
                                DhopReplayFrame.pb.cc
                                ConfigSingleton.cpp)

target_link_libraries(${PROJECT_NAME}  pthread zmq protobuf hv) 

## test

add_executable(ImageReciveTest  ImageReciveTest.cpp
                                Logger.cpp
                                DhopReplayFrame.pb.cc)
target_link_libraries(ImageReciveTest pthread zmq protobuf hv) 